package com.cdut.logistics.model.dao.businesses;

import java.util.Date;

import com.cdut.logistics.model.dao.datacentre.User;



public class UserDao {
	public static UserDao dao =  new UserDao();
	public  User sign(String name,String password,String sex,String phone,int school_id,int academy_id,int major_id,int dorm_id)
	{
		 User user = new User();
	   	 user.setName(name);
	   	 user.setPassword(password);
	   	 user.setSex(sex);
	   	 user.setPhone(phone);
	   	 user.setSchool_id(school_id);
	   	 user.setAcademy_id(academy_id);
	   	 user.setMajor_id(major_id);
	   	 user.setMajor_id(major_id);
	   	 user.setCreated(new Date());
	   	 user.setActive(1);
	     user.setIs_use(1);
	     user.save();
	     return user;
	}
	
	public User query(int user_id)
	{
		User user= User.dao.findById(user_id);
		return user;
	}
}
